<template>
	<div :ref="'settings'" class="settings-sub-container">
		<el-form ref="form" v-model="state.formData" label-width="350px">
			<h2 class="sub-title">{{ $tt('ERP采购订单') }}</h2>
			<el-form-item :label="$tt('入库指令转到预到货状态')">
				<el-select v-model="state.formData.ERP_purchaseOrderAutoAuditing" :placeholder="$tt('请选择预到货状态')">
					<el-option :label="$tt('新建')" value="新建"></el-option>
					<el-option :label="$tt('审核成功')" value="审核成功"></el-option>
					<el-option :label="$tt('在途中')" value="在途中"></el-option>
				</el-select>
			</el-form-item>
			<el-form-item :label="$tt('财务审核合并到采购审核中')">
				<el-switch v-model="state.formData.ERP_finAuditToPurAudit" :active-value="1" :inactive-value="0"></el-switch>
			</el-form-item>

			<el-form-item class="form-footer">
				<el-button type="primary" @click="base.onSave">{{ $tt('保存') }}</el-button>
			</el-form-item>
		</el-form>
	</div>
</template>

<script setup lang="ts" name="settings-consignor">
import { ComponentInternalInstance } from 'vue';
import { BaseProperties } from '/@/types/base-type';
let ins = getCurrentInstance() as ComponentInternalInstance;
let proxy = ins.proxy as BaseProperties;
import to from 'await-to-js';
import { postData } from '/@/api/common/baseApi';
import settingsHook from '../hook/settingsHook';

//#region 定义变量
const state = reactive({
	// 编辑数据对象
	formData: {
		ERP_purchaseOrderAutoAuditing: 0,
		ERP_finAuditToPurAudit: 0,
	} as any,
	valueList: [] as any[],
});
//#endregion

let base = settingsHook({ state });
onMounted(() => {
	base.loadParam();
});
</script>

<style lang="scss" scoped>
.settings-sub-container {
	::v-deep .sub-title {
		font-size: 14px;
		padding-bottom: 10px;
		border-bottom: 1px solid #ebeef5;
		padding-top: 20px;
		margin-bottom: 10px;
	}
	::v-deep .el-form-item__label {
		font-weight: normal;
	}
	.remark {
		color: #888;
	}
	::v-deep .el-form-item {
		margin-bottom: 0px;
	}
	.form-footer {
		margin-top: 30px;
	}
}
</style>
